//
//  CacheServiceProtocol.swift
//  
//
//  Created by tank on 2021/11/17.
//

import Foundation
import UIKit
import LibBase

public typealias ClearCacheCompletion = (_ result: Bool) -> Void

public protocol CacheServiceDelegate: AnyObject {
    func clearCache(completion: ClearCacheCompletion?)
}

public protocol CacheServiceProtocol: AnyObject {
    var delegate: CacheServiceDelegate? { get set }
    
    var globalCache: CacheProtocol { get }
    
    var globalRemovableCache: CacheProtocol { get }
        
    var userCache: CacheProtocol? { get }
    
    var userRemovableCache: CacheProtocol? { get }
 
    func clearCache(completion: ClearCacheCompletion?)

    func setUserCache()
        
    func getCacheSize() -> CGFloat
}
